package com.kaifamiao.buffer;

/**
 * 1、StringBuilder类的设计与StringBuffer类设计基本相同
 * 2、StringBuffer是线程安全的，StringBuilder不是线程安全的
 */
public class StringBuilderTest {

	public static void main(String[] args) {
		
		StringBuilder builder = new StringBuilder();
		
		builder.append(false);
		builder.append( 100 );
		builder.append( "kaifmiao" );
		builder.append( "开发喵" );
		System.out.println( builder );
		System.out.println( builder.length() + " , " + builder.capacity() );
		
		builder.reverse();
		
		System.out.println( builder );

	}

}
